<?php

include_once("core/controller.php");

/**
 * @copyright inovia
 * @package oolime_manager 
 */ 
class logout extends Controller{

  public function isLegitimate(){
    return true;
  }
  
  public function actions(){
    
    $_SESSION["login"]     = "";
    $_SESSION["password"] = "";
    $_SESSION["id"]       = "";
    $_SESSION["level"]    = "0";
    session_destroy(); 
    $this->user = null;
    $Node = $this->response->doc->createElement("userlogout");
		$Node->setAttribute("logout","yes");
		$this->response->add($Node);
    $this->response->setXSLT("views/logout.xsl");
  }
  
  public function defaultActions(){
    $this->response->setXSLT("views/logout.xsl");
  }

}

?>
